<?php
echo $this->loadTemplate('left','default') ;

$tbl = JRequest::getVar('tbl');
$cid = $tbl.'_'.JRequest::getVar('cid');

$cate = JRequest::getVar('cate');
$folder = JRequest::getVar('id') ? '&id='.JRequest::getVar('id') : '';


?>
 <!-- END LEFT -->
<form action="index.php?<?php echo $_SERVER['QUERY_STRING'] ?>" method="post" name="adminForm" id="adminForm">
 <!-- CONTENT -->
 <div id="jm-content">
    <div id="">
     <h3 class="h_title">メッセージ表示</h3>
        <table border=0  id="table-view-message">
            <tr>
                <td>フォルダ</td>
                <td colspan="3"><b>「<?php echo $this->folder ?>」</b></td>
                <td><button href="index.php?top=page&option=com_frmessage&task=delete&cate=<?php echo $cate?>
                    &cid[]=<?php echo $cid.$folder ?>" class="confirm" title="選択されたメッセージを削除します、よろしいですか？">
                    削除
                    </button></td>
                <td><button href="index.php?top=page&option=com_frmessage&task=reply&cate=<?php echo $cate?>&cid[]=<?php echo $cid.$folder ?>">返信</button></td>
                <td><button href="index.php?top=page&option=com_frmessage&task=forward&cate=<?php echo $cate?>&cid[]=<?php echo $cid.$folder ?>">転送</button></td>

                <td><?php echo JHTML::_('Select.genericlist',$this->folders,"folders",'','FOME_CODE','FOME_NAME');?></td>
                <td><!--<a href="#"><button>戻る</button></a>--></td>
            </tr>
            <tr>
                <td>送信者</td>
                <td colspan="2"><input type="text" readonly="true" value="<?php echo $this->mess->MERE_USEM_CODE ?>"/></td>
                <td>日付</td>
                <td colspan="6"><input type="text" readonly="true" value="<?php echo $this->mess->MERE_DATE?>"/></td>
            </tr>
            <tr>
                <td>宛先</td>
                <td colspan="5"><input value="<?php echo $this->mess->MERE_OCBA_CODE_LIST?>" type="text" readonly="true" class="view-big"/></td>
                <td colspan="4"></td>

            </tr>
            <tr>
                <td>件名</td>
                <td colspan="7"><input value="<?php echo $this->mess->MERE_TITLE?>" type="text" readonly="true" class="view-bigx"></td>
                <td colspan="2"></td>

            </tr>
            <tr>
                <td>メッセージ</td>
                <td colspan="10">
                    <textarea readonly="true" rows="15" cols="72" ><?php echo $this->mess->MERE_BODY?></textarea>
                </td>
            </tr>
             <tr>
                <td></td>
                <td colspan="8">
                    <?php
                    $att = explode('|', $this->mess->MERE_ATTA_CODE_LIST);
                    foreach($att as $k=>$attachment){
                        if($attachment){
                            echo "<a href='".PATH_DOWNLOAD.urlencode($attachment)."' class='file_att'>$attachment</a>";
                            if( ($k + 1) % 2 == 0){
                                echo '<br/>';
                            }
                        }
                        
                    }

                    ?>
                </td>
            </tr>
       </table>


   </div>
 </div>
 <!-- END CONTENT -->

  <input type="hidden" name="task" id="task" value=""/>
  

</form>